package net.wofly.cashier.order.service.impl;


import net.wofly.cashier.order.domain.AddContent;
import net.wofly.cashier.order.repository.AddContentRepository;
import net.wofly.cashier.order.service.IAddContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;
import java.util.List;

@Service("iAddContentService")
@Transactional
public class AddContentServiceImpl implements IAddContentService {

	@Autowired
	AddContentRepository addContentRepository;

	@Override
	public AddContent save(AddContent entity) {
		return addContentRepository.save(entity);
	}

	@Override
	public void delete(AddContent entity) {
		addContentRepository.delete(entity);
	}

	@Override
	public void delete(String key) {
		addContentRepository.delete(key);
	}

	@Override
	public AddContent findOne(String key) {
		return addContentRepository.findOne(key);
	}

	@Override
	public List<AddContent> save(List<AddContent> entityList) {
		return (List<AddContent>) addContentRepository.save(entityList);
	}
}
